package person.bing.fbcloud.brushQuestions.thread;


import person.bing.fbcloud.brushQuestions.thread.WaitNotify.Producer;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * 线程main方法
 *
 * @author: mengfanbing
 * @date: 2020/5/28 11:31
 */
public class ThreadMain {
    public static void main(String[] args) throws InterruptedException {
        Map<Integer,Integer> map = new HashMap<>();
        Map<Integer, Integer> synchronizedMap = Collections.synchronizedMap(map);

    }

    public synchronized static void test() throws InterruptedException {
        Thread thread2 = new Thread(new Producer());
//        Thread thread1 = new Thread(new Consumer());
        System.out.println("==============开始===============");
        thread2.start();
//        Thread.sleep(10000);
//        synchronized (thread2){
       /* synchronized (thread2){
            thread2.wait();
        }*/
//            thread2.wait(100000);
//        Thread.sleep(10000);
//        }
//        thread2.notify();
//        thread2.notify();
//        thread1.start();
    }
}
